package Chapter3;
class Person2{
	int age;
	public Person2(int a) {
		age=a;
	}
	public void speak() {
		System.out.println("I am "+age+" years old.");
	}
}

public class Example06 {
	public static void main(String[] args) {
		Person2 p=new Person2(20);
		p.speak();
	}

}
